#ifndef BOTAO_H
#define BOTAO_H

#include <QGraphicsRectItem>
#include <QImage>
#include <QPainter>

class Botao: public QObject, public QGraphicsRectItem
{
public:
    bool over, clicked;
    Botao( QImage img_over , QImage img_out, QImage img_clicked, QString name);

protected:
    void paint( QPainter *, const QStyleOptionGraphicsItem *option, QWidget *widget );
    void mousePressEvent(QGraphicsSceneMouseEvent *event);
    void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
    void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
    void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);

private:
    QImage image_over, image_out, image_clicked;
    QString button_text;
};


#endif // BOTAO_H
